package 内部类;

public class Outer {
    private static int a=5;
    public Inner1 inner;

    public Outer(){
        inner=new Inner1();
    }
    //定义静态内部类
   public static class Inner1{
        private int ib;
        public int getIb() {
            return ib+a;
        }
        public void setIb(int ib) {
            this.ib = ib;
        }
    }


    public void method1(){
        //在方法内定义的为内部类(局部内部类)
    class Inner1{

    }
    }
}
